/*
 * Created on 02-dic-2004
 *
 */
package guru.mercurio.data;

import java.io.FileInputStream;
import java.util.Properties;


/**
 * @author cobach
 *
 */
public class UploadRoko {
    
    public static void main(String[] argv){
        try{
            
            if(argv.length != 1) {
                System.err.println("Please provide the path to the configuration file");
                return;
              }


        FileInputStream is = new FileInputStream(argv[0]);
        Properties prop = new Properties();
        prop.load(is);
		
        String driver=prop.getProperty("db.driver");
        String dbmsURL=prop.getProperty("db.dbmsURL");
        String username=prop.getProperty("db.username");
        String password=prop.getProperty("db.password");

        System.out.println("driver: "+driver);
        System.out.println("dbmsURL: "+dbmsURL);
        System.out.println("username: "+username);
        System.out.println("password: "+password);

        
        DataManager dm=new DataManager(driver,dbmsURL,username,password);    
        PassportDataManager pdm=new PassportDataManager(dm);
        ChannelDataManager cdm=new ChannelDataManager(dm);

   
System.out.println("Inicio");

  // OPERADORAS
  cdm.createOperator("movilnet","CANTV Movilnet",58,416);
  cdm.createOperator("movistar","Telefonica Movistar",58,414);
  cdm.createOperator("digitel","Digitel TIM",58,412);
  cdm.createOperator("infonet","Infonet GSM",58,418);
  cdm.createOperator("digicel","digicel GSM",58,417);
  
  System.out.println("Operadoras listo!");
 
  
  // ***** CANAL *****
  pdm.createPassport("canal", "gimmesushi", "tedexis.com", "soporte@tedexis.com", 58, 414, 1974244);
  
  System.out.println("Canal listo!");
 
  // APLICACIONES
  pdm.setApp("canal", "cgi", "http://www.tedexis.com:8080/demo/index.jsp"," ");
  System.out.println("app de canal listo!");


  
  // PUERTOS
  cdm.createPort("22625","movilnet","yes"); 
  cdm.createPort("22625","movistar","yes");
  cdm.createPort("22625","digitel","no");
  cdm.createPort("CANAL","digitel","yes");
  cdm.createPort("22625","infonet","yes");
  cdm.createPort("22625","digicel","yes");

  System.out.println("puertos de canal listo!");

  // CANALES
  cdm.createChannel("canal","22625","","canal");
  System.out.println("canal canal listo!");

  cdm.addPort2Channel("22625","","22625","movilnet");
  cdm.addPort2Channel("22625","","22625","movistar");
  cdm.addPort2Channel("22625","","22625","digitel");
  cdm.addPort2Channel("22625","","CANAL","digitel");
  cdm.addPort2Channel("22625","","22625","infonet");
  cdm.addPort2Channel("22625","","22625","digicel");
  
  System.out.println("puertos en canal listo!");

  pdm.setCredit("canal",1000000);
  cdm.setDefaultChannel("canal","22625","");
  
  // ***** TSJ *****
  pdm.createPassport("tsj", "gorila", "TSJ", "soporte@tedexis.com", 58, 414, 1974244);        
  System.out.println("tsj listo!");

  // APLICACIONES
  pdm.setApp("tsj", "cgi", "http://www.twindivision.com/production/gracias.txt","clave");
  System.out.println("app de tsj listo!");


  
  // PUERTOS
  cdm.createPort("8751","movilnet","yes"); 
  cdm.createPort("8751","movistar","yes");
  cdm.createPort("8751","digitel","no");
  cdm.createPort("TSJ1","digitel","yes");
  cdm.createPort("8751","infonet","yes");
  cdm.createPort("8751","digicel","yes");
  System.out.println("puertos de tsj listo!");

  // CANALES
  cdm.createChannel("tsj","22625","tsj","tsj");
  System.out.println("subcanal tsj listo!");

  cdm.addPort2Channel("22625","tsj","22625","movilnet");
  cdm.addPort2Channel("22625","tsj","22625","movistar");
  cdm.addPort2Channel("22625","tsj","22625","digitel");
  cdm.addPort2Channel("22625","tsj","CANAL","digitel");
  cdm.addPort2Channel("22625","tsj","22625","infonet");
  cdm.addPort2Channel("22625","tsj","22625","digicel");
  System.out.println("puertos canal en tsj listo!");

  cdm.createChannel("tsj1","8751","","tsj");
  System.out.println("canal tsj1 listo!");

  cdm.addPort2Channel("8751","","8751","movilnet");
  cdm.addPort2Channel("8751","","8751","movistar");
  cdm.addPort2Channel("8751","","8751","digitel");
  cdm.addPort2Channel("8751","","TSJ1","digitel");
  cdm.addPort2Channel("8751","","8751","infonet");
  cdm.addPort2Channel("8751","","8751","digicel");  
  System.out.println("puertos tsj en tsj listo!");
  
  
  cdm.setDefaultChannel("tsj","8751","");
  System.out.println("canal default en tsj listo!");

  pdm.setCredit("tsj",1000000);
  cdm.setDefaultChannel("tsj","22625","tsj");



  // ***** MULTINACIONAL *****
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("multinacional", "twin", "Giovanni Guglielmelli", "gguglielmelli@multinacional.com.ve", 58, 414, 1974244);
  //                           passport  protocol          url                                                                                                                                     key
  
  System.out.println("multi listo!");

  pdm.setApp("multinacional", "cgi", "http://200.35.82.168:8181/receptor/recibeSMS","clave");
  System.out.println("app de multi listo!");

  // PUERTOS


  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("multi","22625","multi","multinacional");
  //                                                      channelID  portID    operatorShortName
  System.out.println("subcanal de multi listo!");

  
  cdm.addPort2Channel("22625","multi","22625","movilnet");
  cdm.addPort2Channel("22625","multi","22625","movistar");
  cdm.addPort2Channel("22625","multi","22625","digitel");
  cdm.addPort2Channel("22625","multi","CANAL","digitel");
  cdm.addPort2Channel("22625","multi","22625","infonet");
  cdm.addPort2Channel("22625","multi","22625","digicel");
  System.out.println("puertos de canal en multi listo!");

  pdm.setCredit("multi",1000000);
  cdm.setDefaultChannel("tsj","22625","multi");

  // ***** AVIOR *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("avior", "gorila", "Yamari Vasquez", "vasquezy@avior.com.ve", 58, 414, 1974244);
  //                           passport  protocol          url                                                                                                                                     key
  
  System.out.println("avior listo!");

  pdm.setApp("avior", "cgi", "http://200.44.120.148:8200/mercurio/recibeSMS","clave");
  System.out.println("app de avior listo!");

  // PUERTOS
  cdm.createPort("28467","movilnet","yes"); 
  cdm.createPort("28467","movistar","yes");
  cdm.createPort("28467","digitel","no");
  cdm.createPort("AVIOR","digitel","yes");
  cdm.createPort("28467","infonet","yes");
  cdm.createPort("28467","digicel","yes");
  System.out.println("puertos de avior listo!");

  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("avior2","22625","avior","avior");
  System.out.println("canal avior listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","avior","22625","movilnet");
  cdm.addPort2Channel("22625","avior","22625","movistar");
  cdm.addPort2Channel("22625","avior","22625","digitel");
  cdm.addPort2Channel("22625","avior","CANAL","digitel");
  cdm.addPort2Channel("22625","avior","22625","infonet");
  cdm.addPort2Channel("22625","avior","22625","digicel");
  System.out.println("puertos canal en sbcanal avior listo!");

  
  cdm.createChannel("avior","28467","","avior");
  System.out.println("canal avior listo!");

  cdm.addPort2Channel("28467","","28467","movilnet");
  cdm.addPort2Channel("28467","","28467","movistar");
  cdm.addPort2Channel("28467","","28467","digitel");
  cdm.addPort2Channel("28467","","AVIOR","digitel");
  cdm.addPort2Channel("28467","","28467","infonet");
  cdm.addPort2Channel("28467","","28467","digicel");   
  System.out.println("puertos avior en avior listo!");

  pdm.setCredit("avior",1000000);
  cdm.setDefaultChannel("avior","22625","avior");


  // ***** CONREDSIS *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("conredsis", "gorila", "Jenny Rodriguez", "jenny.rodriguez@conredsis.com", 58, 212, 7616666);
  //                           passport  protocol          url                                                                                                                                     key
  System.out.println("conredsis listo!");

  pdm.setApp("conredsis", "WS", "http://200.74.217.211:81/SMS_Dispatcher/Receptor.asmx?WSDL","5252");
  System.out.println("app de conredsis listo!");

  // PUERTOS
  cdm.createPort("5252","movilnet","yes"); 
  cdm.createPort("5252","movistar","yes");
  cdm.createPort("5252","digitel","yes");
  cdm.createPort("5252","infonet","yes");
  cdm.createPort("5252","digicel","yes");
  System.out.println("puertos de conredsis listo!");

  // CANALES
  //                                             alias                 id                  subchannel   passport
  cdm.createChannel("conredsis","22625","conredsis","conredsis");
  //                                                      channelID  portID    operatorShortName
  System.out.println("subcanal de conredsis listo!");

  
  cdm.addPort2Channel("22625","conredsis","22625","movilnet");
  cdm.addPort2Channel("22625","conredsis","22625","movistar");
  cdm.addPort2Channel("22625","conredsis","22625","digitel");
  cdm.addPort2Channel("22625","conredsis","CANAL","digitel");
  cdm.addPort2Channel("22625","conredsis","22625","infonet");
  cdm.addPort2Channel("22625","conredsis","22625","digicel");
  System.out.println("puertos de canal en conredsis listo!");

  
  cdm.createChannel("conredsis","5252","","conredsis");
  System.out.println("canal de conredsis listo!");

  cdm.addPort2Channel("5252","","5252","movilnet");
  cdm.addPort2Channel("5252","","5252","movistar");
  cdm.addPort2Channel("5252","","5252","digitel");
  cdm.addPort2Channel("5252","","5252","infonet");
  cdm.addPort2Channel("5252","","5252","digicel");
  System.out.println("puertso de contedsis en conredsis listo!");

  pdm.setCredit("conredsis",1000000);
  cdm.setDefaultChannel("conredsis","22625","conredsis");


  // ***** BANCO CARIBE *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("bancar", "gorila", "Manuel Gianotty", "mgiannotty@bancaribe.com.ve", 58, 212, 5055049);
  //                           passport  protocol          url                                                                                                                                     key
  System.out.println("bancar listo!");

  pdm.setApp("bancar", "cgi", "http://mercurio.twindivision.com/respuesta/standard.php","clave");
  System.out.println("app de bancar listo!");

  // PUERTOS
  cdm.createPort("227423","movilnet","yes"); 
  cdm.createPort("227423","movistar","yes");
  cdm.createPort("227423","digitel","no");
  cdm.createPort("CARIBE","digitel","yes");
  cdm.createPort("227423","infonet","yes");
  cdm.createPort("227423","digicel","yes");
  System.out.println("puertos de bancar listo!");

  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("bancar","22625","caribe","bancar");
  System.out.println("sunchanel caribe listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","caribe","22625","movilnet");
  cdm.addPort2Channel("22625","caribe","22625","movistar");
  cdm.addPort2Channel("22625","caribe","22625","digitel");
  cdm.addPort2Channel("22625","caribe","CANAL","digitel");
  cdm.addPort2Channel("22625","caribe","22625","infonet");
  cdm.addPort2Channel("22625","caribe","22625","digicel");
  System.out.println("puertos canal en caribe listo!");

  
  cdm.createChannel("caribe","227423","","bancar");
  cdm.addPort2Channel("227423","","227423","movilnet");
  cdm.addPort2Channel("227423","","227423","movistar");
  cdm.addPort2Channel("227423","","227423","digitel");
  cdm.addPort2Channel("227423","","CARIBE","digitel");
  cdm.addPort2Channel("227423","","227423","infonet");
  cdm.addPort2Channel("227423","","227423","digicel");   
  System.out.println("puertos caribe en caribe listo!");

  pdm.setCredit("bancar",1000000);
  cdm.setDefaultChannel("bancar","227423","");


  // ***** ZOOM *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("zoom", "twin", "Jackeline Candal", "jcandal@grupozoom.com", 58, 212, 2046839);
  //                           passport  protocol          url                                                                                                                                     key
  System.out.println("zoom listo!");

  
  pdm.setApp("zoom", "cgi", "http://www.grupozoom.com/sms/index.php","magico");
  System.out.println("app zoom listo!");

  // PUERTOS
  cdm.createPort("9666","movilnet","yes"); 
  cdm.createPort("9666","movistar","yes");
  cdm.createPort("9666","digitel","no");
  cdm.createPort("ZOOM","digitel","yes");
  cdm.createPort("9666","infonet","yes");
  cdm.createPort("9666","digicel","yes");
  System.out.println("puertos zoom listo!");

  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("gzoom","22625","zoom","zoom");
  System.out.println("subcanal zoom listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","zoom","22625","movilnet");
  cdm.addPort2Channel("22625","zoom","22625","movistar");
  cdm.addPort2Channel("22625","zoom","22625","digitel");
  cdm.addPort2Channel("22625","zoom","CANAL","digitel");
  cdm.addPort2Channel("22625","zoom","22625","infonet");
  cdm.addPort2Channel("22625","zoom","22625","digicel");
  System.out.println("puertos canal en zoom listo!");

  
  cdm.createChannel("zoom","9666","","zoom");
  System.out.println("canal zoom listo!");

  cdm.addPort2Channel("9666","","9666","movilnet");
  cdm.addPort2Channel("9666","","9666","movistar");
  cdm.addPort2Channel("9666","","9666","digitel");
  cdm.addPort2Channel("9666","","ZOOM","digitel");
  cdm.addPort2Channel("9666","","9666","infonet");
  cdm.addPort2Channel("9666","","9666","digicel");    
  System.out.println("puertos zoom en zoom listo!");

  pdm.setCredit("zoom",1000000);
  cdm.setDefaultChannel("zoom","22625","zoom");


    // ***** BNC *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("bnc", "YUxTAposicion97685", "Angel Buendia", "abuendia@banconacionaldecredito.com.ve", 58, 212, 5765884);
  //                           passport  protocol          url                                                                                                                                     key
  System.out.println("bnc listo!");

  pdm.setApp("bnc", "cgi", "http://206.48.96.234:8181/mercurio/recibeSMS","mercurio");
  System.out.println("app bnc listo!");


  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("canalbnc","22625","bnc","bnc");
  System.out.println("subcanal bnc listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","bnc","22625","movilnet");
  cdm.addPort2Channel("22625","bnc","22625","movistar");
  cdm.addPort2Channel("22625","bnc","22625","digitel");
  cdm.addPort2Channel("22625","bnc","CANAL","digitel");
  cdm.addPort2Channel("22625","bnc","22625","infonet");
  cdm.addPort2Channel("22625","bnc","22625","digicel");
  System.out.println("puertos canal en bnc listo!");

  pdm.setCredit("bnc",1000000);
  cdm.setDefaultChannel("bnc","22625","bnc");



  // ***** Seg. Horizonte *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("seghz", "twin", "Ernesto Contreras", "ernesto.contreras@seguroshorizonte.com", 58, 212, 9051189);
  //                           passport  protocol          url                                                                                                                                     key
  
  System.out.println("seghz listo!");

  pdm.setApp("seghz", "cgi", "http://www.twindivision.com/production/default.txt","mercurio");
  System.out.println("app sehzg listo!");

  // PUERTOS
  cdm.createPort("2463","movilnet","yes"); 
  cdm.createPort("2463","movistar","yes");
  cdm.createPort("2463","digitel","yes");
  cdm.createPort("2463","infonet","yes");
  cdm.createPort("2463","digicel","yes");
  System.out.println("puertos seghz listo!");

  // CANALES
  //                                             alias                 id                  subchannel   passport
  cdm.createChannel("horizonte","22625","horizonte","seghz");
  System.out.println("subcanal seghz listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","horizonte","22625","movilnet");
  cdm.addPort2Channel("22625","horizonte","22625","movistar");
  cdm.addPort2Channel("22625","horizonte","22625","digitel");
  cdm.addPort2Channel("22625","horizonte","CANAL","digitel");
  cdm.addPort2Channel("22625","horizonte","22625","infonet");
  cdm.addPort2Channel("22625","horizonte","22625","digicel");
  System.out.println("puertos canal en seghz listo!");

  
  cdm.createChannel("seghz","2463","","seghz");
  cdm.addPort2Channel("2463","","2463","movilnet");
  cdm.addPort2Channel("2463","","2463","movistar");
  cdm.addPort2Channel("2463","","2463","digitel");
  cdm.addPort2Channel("2463","","2463","infonet");
  cdm.addPort2Channel("2463","","2463","digicel");
  
  System.out.println("puertos seghz en seghz listo!");

  pdm.setCredit("seghz",1000000);
  cdm.setDefaultChannel("seghz","22625","horizonte");


  // ***** SEGUROS MERCANTIL *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("segmer", "gorila", "Jesus Martell", "jmartell@segurosmercantil.com", 58, 212, 2762451);
  //                           passport  protocol          url                                                                                                                                     key
  
  System.out.println("segmer listo!");

  pdm.setApp("segmer", "cgi", "http://200.3.3.162:8888/Mercurio/recibeMercurio","twin");
  System.out.println("app segmer listo!");


  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("segmer","22625","mercantil","segmer");
  System.out.println("subcanal segmer listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","mercantil","22625","movilnet");
  cdm.addPort2Channel("22625","mercantil","22625","movistar");
  cdm.addPort2Channel("22625","mercantil","22625","digitel");
  cdm.addPort2Channel("22625","mercantil","CANAL","digitel");
  cdm.addPort2Channel("22625","mercantil","22625","infonet");
  cdm.addPort2Channel("22625","mercantil","22625","digicel");
  System.out.println("puertos canal en segmer listo!");

  pdm.setCredit("segmer",1000000);
  cdm.setDefaultChannel("segmer","22625","mercantil");


  // ***** CBU *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("cbu", "n1d4l", "Central Banco Universal", "lpoggi@twindivision.com", 58, 416, 6222427);
  //                           passport  protocol          url                                                                                                                                     key
  //pdm.setApp("cbu", "cgi", "http://xxxxx","xxxxx");
  System.out.println("cbu (sin app) listo!");


  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("canalcbu","22625","cbu","cbu");
  System.out.println("subcanal cbu listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","cbu","22625","movilnet");
  cdm.addPort2Channel("22625","cbu","22625","movistar");
  cdm.addPort2Channel("22625","cbu","22625","digitel");
  cdm.addPort2Channel("22625","cbu","CANAL","digitel");
  cdm.addPort2Channel("22625","cbu","22625","infonet");
  cdm.addPort2Channel("22625","cbu","22625","digicel");
  System.out.println("puertos canal en cbu listo!");

  pdm.setCredit("cbu",1000000);
  cdm.setDefaultChannel("cbu","22625","cbu");


  // ***** CREDICARD *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("credicard", "n1d4l", "Consorcio Credicard", "roberto@twindivision.com", 58, 414, 3081371);
  //                           passport  protocol          url                                                                                                                                     key
  //pdm.setApp("credicard", "cgi", "http://www.xxxxx","xxxxx");
  System.out.println("credicard listo!");


  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("canalccard","22625","credicard","credicard");
  //                                                      channelID  portID    operatorShortName
 
  System.out.println("suncanal credicard listo!");

  cdm.addPort2Channel("22625","credicard","22625","movilnet");
  cdm.addPort2Channel("22625","credicard","22625","movistar");
  cdm.addPort2Channel("22625","credicard","22625","digitel");
  cdm.addPort2Channel("22625","credicard","CANAL","digitel");
  cdm.addPort2Channel("22625","credicard","22625","infonet");
  cdm.addPort2Channel("22625","credicard","22625","digicel");
  System.out.println("puertos canal en credicard listo!");

  pdm.setCredit("credicard",1000000);
  cdm.setDefaultChannel("credicard","22625","credicard");


  // ***** IPSFA *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("ipsfa", "fdm%2005", "Sgto Cadenas", "rcadenas@cantv.net", 58, 414, 2766750);
  //                           passport  protocol          url                                                                                                                                     key
  //pdm.setApp("ipsfa", "cgi", "http://xxxxxxxxx","xxxxxxxxxxxxx");
  
  System.out.println("ipsfa listo!");

  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("canalipsfa","22625","ipsfa","ipsfa");
  
  System.out.println("subcanal ispfa listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","ipsfa","22625","movilnet");
  cdm.addPort2Channel("22625","ipsfa","22625","movistar");
  cdm.addPort2Channel("22625","ipsfa","22625","digitel");
  cdm.addPort2Channel("22625","ipsfa","CANAL","digitel");
  cdm.addPort2Channel("22625","ipsfa","22625","infonet");
  cdm.addPort2Channel("22625","ipsfa","22625","digicel");
  System.out.println("puertos canal en sipfa listo!");

  pdm.setCredit("ipsfa",1000000);
  cdm.setDefaultChannel("ipsfa","22625","ipsfa");

  // ***** BANESCO *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("banesco", "banesco@2005", "BANESCO", "soporte@tedexis.com", 58, 414, 1974244);
  //                           passport  protocol          url                                                                                                                                     key
  //pdm.setApp("banesco", "cgi", "http://xxxxxxxxxxx","xxxxxxxxxxxxx");
  System.out.println("banesco listo!");


  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("canalbanesco","22625","banesco","banesco");
  System.out.println("subcanal banesco listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","banesco","22625","movilnet");
  cdm.addPort2Channel("22625","banesco","22625","movistar");
  cdm.addPort2Channel("22625","banesco","22625","digitel");
  cdm.addPort2Channel("22625","banesco","CANAL","digitel");
  cdm.addPort2Channel("22625","banesco","22625","infonet");
  cdm.addPort2Channel("22625","banesco","22625","digicel");
  System.out.println("subpuertos canal en banesco listo!");

  pdm.setCredit("banesco",1000000);
  cdm.setDefaultChannel("banesco","22625","banesco");


  // ***** TOYOTA *****************************************************************************
  //                                                id                                    password   contactName   contactEmail
  pdm.createPassport("toyota", "twin", " Jose Cortes", "jose_cortes@toyotaservices.com.ve", 58, 414, 1051470);
  //                           passport  protocol          url                                                                                                                                     key
  //pdm.setApp("toyota", "cgi", "http://xxxxxxxxxxxxxxxx","xxxxxxxxxxxxx");
  
  System.out.println("toyota listo!");

  // CANALES
  //                                             alias        id                  subchannel   passport
  cdm.createChannel("canaltoyota","22625","toyota","toyota");
  System.out.println("subcanal toyota listo!");

  //                                                      channelID  portID    operatorShortName
  cdm.addPort2Channel("22625","toyota","22625","movilnet");
  cdm.addPort2Channel("22625","toyota","22625","movistar");
  cdm.addPort2Channel("22625","toyota","22625","digitel");
  cdm.addPort2Channel("22625","toyota","CANAL","digitel");
  cdm.addPort2Channel("22625","toyota","22625","infonet");
  cdm.addPort2Channel("22625","toyota","22625","digicel");
  System.out.println("puertos canal en toyota listo!");

  pdm.setCredit("toyota",1000000);
  cdm.setDefaultChannel("toyota","22625","toyota");

  
  
        System.out.println("Actualizacion finalizada con exito.");

        }
        catch(Exception e){
            System.out.println("Hubo un error:"+e);
            e.printStackTrace();

        }
    }
    

}
